package com.marktotop.file.exception;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;

/**
 * @author WXLD
 * @data 2021/4/16 - 12:15
 */
@Getter
public enum SystemErrorCode implements BaseError{

    /**
     *自定义异常处理 50000-60000
     */
    PARAMETER_ERROR(50000,"参数不合法！"),
    FILE_UPLOAD_ERROR(50001,"文件上传失败！"),
    IMAGE_TYPE_ERROR(50002,"图片类型不支持,支持jpeg/png/bmp/gif！"),
    IMAGE_SIZE_ERROR(50003,"image图片资源不合规范"),
    IMAGE_ERROR(50004,"校验文件内容失败，请核对！"),
    FILE_SIZE_ERROR(50005,"文件大小超过限制，限制100MB以内"),
    FILE_DELETE_ERROR(50006,"文件删除失败，请重试！")
    ;

    /** 错误码 */
    @ApiModelProperty(value = "返回码")
    private int resultCode;

    /** 错误描述 */
    @ApiModelProperty(value = "错误信息")
    private String resultMsg;


    SystemErrorCode(int resultCode, String resultMsg) {
        this.resultCode = resultCode;
        this.resultMsg = resultMsg;
    }

    @Override
    public int getResultCode() {
        return resultCode;
    }

    @Override
    public String getResultMsg() {
        return resultMsg;
    }
}
